﻿using ECharts.Utility;
using Newtonsoft.Json;
/******************************************************************* 
* Copyright (C)  版权所有
* 创建时间:2019/4/29 16:40:36
* 作    者: zhenhua.shen
* 邮    箱：1025556487@qq.com
* 描    述：类功能描述
* 修改记录:修改类的记录
* 修改人:修改此类的人名称
* 版 本 号:v1.0.0
**********************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Design;
using System.Linq;
using System.Text;

namespace ECharts.Title
{
    [Serializable]
    [TypeConverter(typeof(ExpandableObjectConverter))]
    [JsonConverter(typeof(NoTypeConverter<FontStyle>))]
    public class FontStyle
    {

        private string _fontFamily = "Arial, Verdana, sans-serif";
        /// <summary>
        /// 字体系列
        /// </summary>
        [Description("字体系列")]
        [Editor("System.Drawing.Design.FontNameEditor, System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
        [NotifyParentProperty(true)]
        [TypeConverter(typeof(FontConverter.FontNameConverter))]
        public string fontFamily 
        {
            get
            {
                return _fontFamily;
            }
            set
            {
                _fontFamily = value;
            }
        }

        private int _fontSize = 12;
        /// <summary>
        /// 字号 ，单位px
        /// </summary>
        [Description("字号 ，单位px")]
        [NotifyParentProperty(true)]
        public int fontSize
        {
            get
            {
                return _fontSize;
            }
            set
            {
                _fontSize = value;
            }
        }

        private string _fontStyle = "normal";
        /// <summary>
        /// 样式，可选为：'normal' | 'italic' | 'oblique'
        /// </summary>
        [Description("样式，可选为：'normal' | 'italic' | 'oblique'")]
        [NotifyParentProperty(true)]
        public string fontStyle
        {
            get
            {
                return _fontStyle;
            }
            set
            {
                _fontStyle = value;
            }
        }


        private string _fontWeight = "normal";
        /// <summary>
        /// 粗细，可选为：'normal' | 'bold' | 'bolder' | 'lighter' | 100 | 200 |... | 900
        /// </summary>
        [Description("粗细，可选为：'normal' | 'bold' | 'bolder' | 'lighter' | 100 | 200 |... | 900")]
        [NotifyParentProperty(true)]
        public string fontWeight
        {
            get
            {
                return _fontWeight;
            }
            set
            {
                _fontWeight = value;
            }
        }
    }
}
